package com.shop.model;


public class Student {
    // Attributes
    private String name;//姓名
    private int age;//年龄
    private int grade;//年级
    private double money;//余额
    private String major;//专业
    private String identity;//身份
    private String studentId;//主键 学号
    private String password;//密码
    private String phone;//电话

    // Default Constructor
    public Student() {
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    // Parameterized Constructor
    public Student(String name, int age, int grade, String studentId, String password,String phone, double money, String major, String identity) {
        this.name = name;
        this.age = age;
        this.grade = grade;
        this.studentId = studentId;
        this.password = password;
        this.phone = phone;
        this.money = money;
        this.major = major;
        this.identity = identity;
    }

    // Getter and Setter Methods
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getGrade() {
        return grade;
    }

    public void setGrade(int grade) {
        this.grade = grade;
    }

    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    // ToString Method
    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", grade=" + grade +
                ", studentId='" + studentId + '\'' +
                ", password=" + password +
                ", phone='" + phone + '\'' +
                ", money=" + money +
                ", major='" + major + '\'' +
                ", identity='" + identity + '\'' +
                '}';
    }
}

